/**
 * 获取用户openid
 */
async function getOpenid() {
    var c1 = new wx.cloud.Cloud({
        // 资源方 AppID
        resourceAppid: getApp().globalData.resourceAppid,
        // 资源方环境 ID
        resourceEnv: getApp().globalData.resourceEnv,
    })
    await c1.init()
    return new Promise((resolve, reject) => {
        c1.callFunction({
            name: 'myFunction',
        }).then((res) => {
            console.log(res,"获取openid");
            resolve(res.result.event.userInfo.openId)
        })
    })
}
export {
    getOpenid
}
